<?php
namespace App\Pay\Contracts;

interface GatewayInterface
{
    /**
     * @param string $gateway
     * @param array $params
     * @return mixed
     */
    public function pay(string $endpoint, array $params);

    /**
     * @param array $params ['out_trade_no', 'transaction_id']
     * @return mixed
     */
    public function query(array $params);

    /**
     * @param array $params
     * @return mixed
     */
    public function cancel(array $params);

    /**
     * @param array $params
     * @return mixed
     */
    public function close(array $params);

    /**
     * @param array $params
     * @return mixed
     */
    public function refund(array $params);

    /**
     * @param array $params
     * @return mixed
     */
    public function refundQuery(array $params);

    /**
     * @param $content
     * @param $isRefund
     * @return mixed
     */
    public function verify($content, $isRefund) ;

    /**
     * @return mixed
     */
    public function success();
}
